package org.fuys.coder.domain.audit.model.vo;

/**
 * @projectName: fuys-low-coder
 * @package: org.fuys.coder.domain.audit.model.vo
 * @className: AuditResultSuggestion
 * @author: WangJing
 * @description: 审核调用之后的建议
 * @date: 2024/6/23 11:38
 * @version: 1.0
 */
public enum AuditResultSuggestion {
    PASS("pass"){
        @Override
        public int getType() {
            return 1;
        }
    },
    BLOCK("block"){
        @Override
        public int getType() {
            return 2;
        }
    },
    REVIEW("review"){
        @Override
        public int getType() {
            return 3;
        }
    };

    String desc;

    AuditResultSuggestion(String desc) {
        this.desc=desc;
    }

    public int getType(){
        return 0;
    }


    public static int getType(String desc){
        final AuditResultSuggestion[] values = AuditResultSuggestion.values();
        for (AuditResultSuggestion value : values) {
            if(value.desc.equals(desc)){
                return value.getType();
            }
        }
        return 0;
    }
}
